package com.ruoyi.admin.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.persistence.Column;

/**
 * 部门列表对象 corp_company_departments
 * 
 * @author Jimmy
 * @date 2022-08-04
 */
public class CorpCompanyDepartments extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Integer id;

    /** 公司ID */
    @Excel(name = "公司ID")
    private Integer companyId;

    private CorpCompanies company;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Integer dpmId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String name;

    /** 父级ID */
    @Excel(name = "父级ID")
    private Integer parentId;

    /** 部门路径 */
    @Excel(name = "部门路径")
    private String path;

    /** 排序 */
    @Excel(name = "排序")
    @Column(name = "`order`")
    private Long order;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deletedAt;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setCompanyId(Integer companyId) 
    {
        this.companyId = companyId;
    }

    public Integer getCompanyId() 
    {
        return companyId;
    }
    public void setDpmId(Integer dpmId) 
    {
        this.dpmId = dpmId;
    }

    public Integer getDpmId() 
    {
        return dpmId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setParentId(Integer parentId) 
    {
        this.parentId = parentId;
    }

    public Integer getParentId() 
    {
        return parentId;
    }
    public void setPath(String path) 
    {
        this.path = path;
    }

    public String getPath() 
    {
        return path;
    }
    public void setOrder(Long order)
    {
        this.order = order;
    }

    public Long getOrder()
    {
        return order;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setDeletedAt(Date deletedAt) 
    {
        this.deletedAt = deletedAt;
    }

    public Date getDeletedAt() 
    {
        return deletedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("companyId", getCompanyId())
            .append("dpmId", getDpmId())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("path", getPath())
            .append("order", getOrder())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("deletedAt", getDeletedAt())
            .toString();
    }

    public void setCompany(CorpCompanies company) {
        this.company = company;
    }

    public CorpCompanies getCompany() {
        return company;
    }
}
